package reflection.dproxy.misobject;

public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// IPerson person = (IPerson) ViewProxy.newInstance(new Person(), new Class[] { IPerson.class });

		IPerson person = (IPerson) ViewProxy.newInstance(new IPerson() {
				private String name;
				
				@Override
				public void setName(String name) {
					this.name = name;
				}
	
				@Override
				public String getName() {
					return name;
				}
			}, new Class[] { IPerson.class });

		person.setName("Roy");
		System.out.println(person.getName());
	}

}
